import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "home",
      component: () => import("@/views/Home.vue"),
    },
    {
      path: "/category",
      name: "category",
      component: () => import("@/views/Category.vue"),
    },
    {
      path: "/message",
      name: "message",
      component: () => import("@/views/Message.vue"),
    },
    {
      path: "/car",
      name: "car",
      component: () => import("@/views/Car.vue"),
    },
    {
      path: "/my",
      name: "my",
      component: () => import("@/views/My.vue"),
    },
    {
      path: "/product/:id",
      name: "product",
      component: () => import("@/views/Product.vue"),
    },
    {
      path: "/detail/:id",
      name: "detail",
      component: () => import("@/views/Detail.vue"),
    },
    {
      path: "/login",
      name: "login",
      component: () => import("@/views/Login.vue"),
    },
  ],
});
export default router;
